Optimal. Leaf size=251 \[ \frac {5 (7 A+i B) x}{128 a^3 c^4}+\frac {A+i B}{96 a^3 c^4 f (i-\tan (e+f x))^3}-\frac {5 i A-3 B}{128 a^3 c^4 f (i-\tan (e+f x))^2}-\frac {5 (3 A+i B)}{128 a^3 c^4 f (i-\tan (e+f x))}-\frac {i A+B}{64 a^3 c^4 f (i+\tan (e+f x))^4}-\frac {2 A-i B}{48 a^3 c^4 f (i+\tan (e+f x))^3}+\frac {5 i A+B}{64 a^3 c^4 f (i+\tan (e+f x))^2}+\frac {5 A}{32 a^3 c^4 f (i+\tan (e+f x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.21, antiderivative size = 251, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.073, Rules used = {3669, 78, 209}
\begin {gather*} -\frac {5 (3 A+i B)}{128 a^3 c^4 f (-\tan (e+f x)+i)}-\frac {-3 B+5 i A}{128 a^3 c^4 f (-\tan (e+f x)+i)^2}+\frac {B+5 i A}{64 a^3 c^4 f (\tan (e+f x)+i)^2}+\frac {A+i B}{96 a^3 c^4 f (-\tan (e+f x)+i)^3}-\frac {2 A-i B}{48 a^3 c^4 f (\tan (e+f x)+i)^3}-\frac {B+i A}{64 a^3 c^4 f (\tan (e+f x)+i)^4}+\frac {5 x (7 A+i B)}{128 a^3 c^4}+\frac {5 A}{32 a^3 c^4 f (\tan (e+f x)+i)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 78
Rule 209
Rule 3669
Rubi steps
\begin {align*} \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^4} \, dx &=\frac {(a c) \text {Subst}\left (\int \frac {A+B x}{(a+i a x)^4 (c-i c x)^5} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \text {Subst}\left (\int \left (\frac {A+i B}{32 a^4 c^5 (-i+x)^4}+\frac {i (5 A+3 i B)}{64 a^4 c^5 (-i+x)^3}-\frac {5 (3 A+i B)}{128 a^4 c^5 (-i+x)^2}+\frac {i A+B}{16 a^4 c^5 (i+x)^5}+\frac {2 A-i B}{16 a^4 c^5 (i+x)^4}-\frac {i (5 A-i B)}{32 a^4 c^5 (i+x)^3}-\frac {5 A}{32 a^4 c^5 (i+x)^2}+\frac {5 (7 A+i B)}{128 a^4 c^5 \left (1+x^2\right )}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {A+i B}{96 a^3 c^4 f (i-\tan (e+f x))^3}-\frac {5 i A-3 B}{128 a^3 c^4 f (i-\tan (e+f x))^2}-\frac {5 (3 A+i B)}{128 a^3 c^4 f (i-\tan (e+f x))}-\frac {i A+B}{64 a^3 c^4 f (i+\tan (e+f x))^4}-\frac {2 A-i B}{48 a^3 c^4 f (i+\tan (e+f x))^3}+\frac {5 i A+B}{64 a^3 c^4 f (i+\tan (e+f x))^2}+\frac {5 A}{32 a^3 c^4 f (i+\tan (e+f x))}+\frac {(5 (7 A+i B)) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{128 a^3 c^4 f}\\ &=\frac {5 (7 A+i B) x}{128 a^3 c^4}+\frac {A+i B}{96 a^3 c^4 f (i-\tan (e+f x))^3}-\frac {5 i A-3 B}{128 a^3 c^4 f (i-\tan (e+f x))^2}-\frac {5 (3 A+i B)}{128 a^3 c^4 f (i-\tan (e+f x))}-\frac {i A+B}{64 a^3 c^4 f (i+\tan (e+f x))^4}-\frac {2 A-i B}{48 a^3 c^4 f (i+\tan (e+f x))^3}+\frac {5 i A+B}{64 a^3 c^4 f (i+\tan (e+f x))^2}+\frac {5 A}{32 a^3 c^4 f (i+\tan (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.53, size = 267, normalized size = 1.06 \begin {gather*} \frac {\sec ^3(e+f x) (-\cos (4 (e+f x))-i \sin (4 (e+f x))) (60 (A (-7-14 i f x)+B (i+2 f x)) \cos (e+f x)+18 (7 A+9 i B) \cos (3 (e+f x))+14 A \cos (5 (e+f x))+50 i B \cos (5 (e+f x))+A \cos (7 (e+f x))+7 i B \cos (7 (e+f x))-420 i A \sin (e+f x)-60 B \sin (e+f x)-840 A f x \sin (e+f x)-120 i B f x \sin (e+f x)-378 i A \sin (3 (e+f x))+54 B \sin (3 (e+f x))-70 i A \sin (5 (e+f x))+10 B \sin (5 (e+f x))-7 i A \sin (7 (e+f x))+B \sin (7 (e+f x)))}{3072 a^3 c^4 f (-i+\tan (e+f x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.33, size = 190, normalized size = 0.76
method | result | size |
derivativedivides | \(\frac {-\frac {\frac {i A}{16}+\frac {B}{16}}{4 \left (i+\tan \left (f x +e \right )\right )^{4}}+\frac {5 A}{32 \left (i+\tan \left (f x +e \right )\right )}+\left (\frac {35 i A}{256}-\frac {5 B}{256}\right ) \ln \left (i+\tan \left (f x +e \right )\right )-\frac {-\frac {i B}{16}+\frac {A}{8}}{3 \left (i+\tan \left (f x +e \right )\right )^{3}}-\frac {-\frac {5 i A}{32}-\frac {B}{32}}{2 \left (i+\tan \left (f x +e \right )\right )^{2}}-\frac {\frac {A}{32}+\frac {i B}{32}}{3 \left (-i+\tan \left (f x +e \right )\right )^{3}}-\frac {-\frac {15 A}{128}-\frac {5 i B}{128}}{-i+\tan \left (f x +e \right )}-\frac {\frac {5 i A}{64}-\frac {3 B}{64}}{2 \left (-i+\tan \left (f x +e \right )\right )^{2}}+\left (-\frac {35 i A}{256}+\frac {5 B}{256}\right ) \ln \left (-i+\tan \left (f x +e \right )\right )}{f \,a^{3} c^{4}}\) | \(190\) |
default | \(\frac {-\frac {\frac {i A}{16}+\frac {B}{16}}{4 \left (i+\tan \left (f x +e \right )\right )^{4}}+\frac {5 A}{32 \left (i+\tan \left (f x +e \right )\right )}+\left (\frac {35 i A}{256}-\frac {5 B}{256}\right ) \ln \left (i+\tan \left (f x +e \right )\right )-\frac {-\frac {i B}{16}+\frac {A}{8}}{3 \left (i+\tan \left (f x +e \right )\right )^{3}}-\frac {-\frac {5 i A}{32}-\frac {B}{32}}{2 \left (i+\tan \left (f x +e \right )\right )^{2}}-\frac {\frac {A}{32}+\frac {i B}{32}}{3 \left (-i+\tan \left (f x +e \right )\right )^{3}}-\frac {-\frac {15 A}{128}-\frac {5 i B}{128}}{-i+\tan \left (f x +e \right )}-\frac {\frac {5 i A}{64}-\frac {3 B}{64}}{2 \left (-i+\tan \left (f x +e \right )\right )^{2}}+\left (-\frac {35 i A}{256}+\frac {5 B}{256}\right ) \ln \left (-i+\tan \left (f x +e \right )\right )}{f \,a^{3} c^{4}}\) | \(190\) |
norman | \(\frac {\frac {5 \left (i B +7 A \right ) x}{128 a c}-\frac {i A +B}{8 a c f}+\frac {\left (-5 i B +93 A \right ) \tan \left (f x +e \right )}{128 a c f}+\frac {73 \left (i B +7 A \right ) \left (\tan ^{3}\left (f x +e \right )\right )}{384 a c f}+\frac {55 \left (i B +7 A \right ) \left (\tan ^{5}\left (f x +e \right )\right )}{384 a c f}+\frac {5 \left (i B +7 A \right ) \left (\tan ^{7}\left (f x +e \right )\right )}{128 a c f}+\frac {5 \left (i B +7 A \right ) x \left (\tan ^{2}\left (f x +e \right )\right )}{32 a c}+\frac {15 \left (i B +7 A \right ) x \left (\tan ^{4}\left (f x +e \right )\right )}{64 a c}+\frac {5 \left (i B +7 A \right ) x \left (\tan ^{6}\left (f x +e \right )\right )}{32 a c}+\frac {5 \left (i B +7 A \right ) x \left (\tan ^{8}\left (f x +e \right )\right )}{128 a c}}{a^{2} c^{3} \left (1+\tan ^{2}\left (f x +e \right )\right )^{4}}\) | \(261\) |
risch | \(\frac {5 i x B}{128 a^{3} c^{4}}+\frac {35 x A}{128 a^{3} c^{4}}-\frac {{\mathrm e}^{8 i \left (f x +e \right )} B}{1024 a^{3} c^{4} f}-\frac {i \sin \left (4 f x +4 e \right ) B}{128 a^{3} c^{4} f}-\frac {\cos \left (6 f x +6 e \right ) B}{128 a^{3} c^{4} f}-\frac {i {\mathrm e}^{8 i \left (f x +e \right )} A}{1024 a^{3} c^{4} f}-\frac {i \sin \left (6 f x +6 e \right ) B}{192 a^{3} c^{4} f}+\frac {\sin \left (6 f x +6 e \right ) A}{96 a^{3} c^{4} f}-\frac {7 \cos \left (4 f x +4 e \right ) B}{256 a^{3} c^{4} f}-\frac {i \cos \left (6 f x +6 e \right ) A}{128 a^{3} c^{4} f}+\frac {i \sin \left (2 f x +2 e \right ) B}{64 a^{3} c^{4} f}+\frac {7 \sin \left (4 f x +4 e \right ) A}{128 a^{3} c^{4} f}-\frac {7 \cos \left (2 f x +2 e \right ) B}{128 a^{3} c^{4} f}-\frac {7 i \cos \left (4 f x +4 e \right ) A}{256 a^{3} c^{4} f}-\frac {7 i \cos \left (2 f x +2 e \right ) A}{128 a^{3} c^{4} f}+\frac {7 \sin \left (2 f x +2 e \right ) A}{32 a^{3} c^{4} f}\) | \(324\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 4.46, size = 159, normalized size = 0.63 \begin {gather*} \frac {{\left (120 \, {\left (7 \, A + i \, B\right )} f x e^{\left (6 i \, f x + 6 i \, e\right )} - 3 \, {\left (i \, A + B\right )} e^{\left (14 i \, f x + 14 i \, e\right )} - 4 \, {\left (7 i \, A + 5 \, B\right )} e^{\left (12 i \, f x + 12 i \, e\right )} - 18 \, {\left (7 i \, A + 3 \, B\right )} e^{\left (10 i \, f x + 10 i \, e\right )} - 60 \, {\left (7 i \, A + B\right )} e^{\left (8 i \, f x + 8 i \, e\right )} - 36 \, {\left (-7 i \, A + 3 \, B\right )} e^{\left (4 i \, f x + 4 i \, e\right )} - 6 \, {\left (-7 i \, A + 5 \, B\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + 4 i \, A - 4 \, B\right )} e^{\left (-6 i \, f x - 6 i \, e\right )}}{3072 \, a^{3} c^{4} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.69, size = 605, normalized size = 2.41 \begin {gather*} \begin {cases} \frac {\left (\left (13510798882111488 i A a^{18} c^{24} f^{6} e^{6 i e} - 13510798882111488 B a^{18} c^{24} f^{6} e^{6 i e}\right ) e^{- 6 i f x} + \left (141863388262170624 i A a^{18} c^{24} f^{6} e^{8 i e} - 101330991615836160 B a^{18} c^{24} f^{6} e^{8 i e}\right ) e^{- 4 i f x} + \left (851180329573023744 i A a^{18} c^{24} f^{6} e^{10 i e} - 364791569817010176 B a^{18} c^{24} f^{6} e^{10 i e}\right ) e^{- 2 i f x} + \left (- 1418633882621706240 i A a^{18} c^{24} f^{6} e^{14 i e} - 202661983231672320 B a^{18} c^{24} f^{6} e^{14 i e}\right ) e^{2 i f x} + \left (- 425590164786511872 i A a^{18} c^{24} f^{6} e^{16 i e} - 182395784908505088 B a^{18} c^{24} f^{6} e^{16 i e}\right ) e^{4 i f x} + \left (- 94575592174780416 i A a^{18} c^{24} f^{6} e^{18 i e} - 67553994410557440 B a^{18} c^{24} f^{6} e^{18 i e}\right ) e^{6 i f x} + \left (- 10133099161583616 i A a^{18} c^{24} f^{6} e^{20 i e} - 10133099161583616 B a^{18} c^{24} f^{6} e^{20 i e}\right ) e^{8 i f x}\right ) e^{- 12 i e}}{10376293541461622784 a^{21} c^{28} f^{7}} & \text {for}\: a^{21} c^{28} f^{7} e^{12 i e} \neq 0 \\x \left (- \frac {35 A + 5 i B}{128 a^{3} c^{4}} + \frac {\left (A e^{14 i e} + 7 A e^{12 i e} + 21 A e^{10 i e} + 35 A e^{8 i e} + 35 A e^{6 i e} + 21 A e^{4 i e} + 7 A e^{2 i e} + A - i B e^{14 i e} - 5 i B e^{12 i e} - 9 i B e^{10 i e} - 5 i B e^{8 i e} + 5 i B e^{6 i e} + 9 i B e^{4 i e} + 5 i B e^{2 i e} + i B\right ) e^{- 6 i e}}{128 a^{3} c^{4}}\right ) & \text {otherwise} \end {cases} + \frac {x \left (35 A + 5 i B\right )}{128 a^{3} c^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.91, size = 271, normalized size = 1.08 \begin {gather*} \frac {\frac {60 \, {\left (7 i \, A - B\right )} \log \left (\tan \left (f x + e\right ) + i\right )}{a^{3} c^{4}} - \frac {60 \, {\left (7 i \, A - B\right )} \log \left (-i \, \tan \left (f x + e\right ) - 1\right )}{a^{3} c^{4}} + \frac {2 \, {\left (385 \, A \tan \left (f x + e\right )^{3} + 55 i \, B \tan \left (f x + e\right )^{3} - 1335 i \, A \tan \left (f x + e\right )^{2} + 225 \, B \tan \left (f x + e\right )^{2} - 1575 \, A \tan \left (f x + e\right ) - 321 i \, B \tan \left (f x + e\right ) + 641 i \, A - 167 \, B\right )}}{a^{3} c^{4} {\left (i \, \tan \left (f x + e\right ) + 1\right )}^{3}} + \frac {-875 i \, A \tan \left (f x + e\right )^{4} + 125 \, B \tan \left (f x + e\right )^{4} + 3980 \, A \tan \left (f x + e\right )^{3} + 500 i \, B \tan \left (f x + e\right )^{3} + 6930 i \, A \tan \left (f x + e\right )^{2} - 702 \, B \tan \left (f x + e\right )^{2} - 5548 \, A \tan \left (f x + e\right ) - 340 i \, B \tan \left (f x + e\right ) - 1771 i \, A - 35 \, B}{a^{3} c^{4} {\left (\tan \left (f x + e\right ) + i\right )}^{4}}}{3072 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 10.40, size = 286, normalized size = 1.14 \begin {gather*} \frac {\mathrm {tan}\left (e+f\,x\right )\,\left (-\frac {11\,B}{128\,a^3\,c^4}+\frac {A\,77{}\mathrm {i}}{128\,a^3\,c^4}\right )+{\mathrm {tan}\left (e+f\,x\right )}^3\,\left (-\frac {5\,B}{48\,a^3\,c^4}+\frac {A\,35{}\mathrm {i}}{48\,a^3\,c^4}\right )+{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (\frac {35\,A}{48\,a^3\,c^4}+\frac {B\,5{}\mathrm {i}}{48\,a^3\,c^4}\right )+{\mathrm {tan}\left (e+f\,x\right )}^5\,\left (-\frac {5\,B}{128\,a^3\,c^4}+\frac {A\,35{}\mathrm {i}}{128\,a^3\,c^4}\right )+{\mathrm {tan}\left (e+f\,x\right )}^6\,\left (\frac {35\,A}{128\,a^3\,c^4}+\frac {B\,5{}\mathrm {i}}{128\,a^3\,c^4}\right )+{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (\frac {77\,A}{128\,a^3\,c^4}+\frac {B\,11{}\mathrm {i}}{128\,a^3\,c^4}\right )+\frac {A}{8\,a^3\,c^4}-\frac {B\,1{}\mathrm {i}}{8\,a^3\,c^4}}{f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^7+{\mathrm {tan}\left (e+f\,x\right )}^6\,1{}\mathrm {i}+3\,{\mathrm {tan}\left (e+f\,x\right )}^5+{\mathrm {tan}\left (e+f\,x\right )}^4\,3{}\mathrm {i}+3\,{\mathrm {tan}\left (e+f\,x\right )}^3+{\mathrm {tan}\left (e+f\,x\right )}^2\,3{}\mathrm {i}+\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )}+\frac {5\,x\,\left (7\,A+B\,1{}\mathrm {i}\right )}{128\,a^3\,c^4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________